package com.innovation.sys.controller;

import java.util.List;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.innovation.sys.common.vo.Ret;
import com.innovation.sys.pojo.SSysLog;
import com.innovation.sys.service.LogAdminService;

@Controller
@RequestMapping("/api/admin/basic/statistic")
public class StatisticAPIController {
	
	private static Logger logger = LoggerFactory.getLogger(StatisticAPIController.class);
	
	@Resource
	private LogAdminService logAdminService;
	
	@RequestMapping(value = "/routeToStatistic", method = { RequestMethod.GET })
	public String routeToStatistic() {
		return "layuiAdmin/admin/statistic/statistic";
	}
	
	@RequestMapping(value = "/queryByCriteriaList", method = { RequestMethod.GET })
	@ResponseBody
	public Ret queryByCriteriaList() {
		logger.info("日志报表业务开始===>");
		List<SSysLog> queryByCriteria = logAdminService.queryByCriteria();
		return Ret.ok("data",queryByCriteria);
	}
	
}
